package middlewareorid.ui;

import middlewareorid.engine.Config;
import waba.fx.Color;
import waba.fx.Font;
import waba.fx.Rect;
import waba.ui.Container;
import waba.ui.Label;

public class WelcomePanel extends Container {

	Label logo1 = new Label("BLOGS.");

	Label logo2 = new Label("OR.ID");
	
	Rect rect;
	
	public WelcomePanel(Rect rect) {
		this.rect = rect;				
	}

	public void onStart() {
		/*
		 add(new Label("Name:"), LEFT + 5, TOP + 5); 
		 add(edName = new Edit(""), AFTER + 5, SAME - 1); 
		 add(edTel = new Edit(""), SAME, AFTER + 10); 
		 add(new Label("Tel.:"), BEFORE - 5, SAME - 1);
		 */
		Font logoFont = new Font("Arial", Font.BOLD, 10);
		logo1.setFont(logoFont);
		add(logo1);
		logo1.setRect((this.rect.width/2 - logo1.getPreferredWidth()/2 - 15), 20, PREFERRED, PREFERRED);
		
		logo1.set3d(true);
		logo1.setBackForeColors(Color.BLACK, Color.WHITE);

		logo2.setFont(logoFont);
		add(logo2);
		logo2.setRect((this.rect.width/2 + logo1.getPreferredWidth()/2 - 15), 20, PREFERRED, PREFERRED);
		logo2.set3d(true);
		logo2.setBackForeColors(Color.WHITE, Color.BLACK);
		
		Label lab5 = new Label(
				"Thank's for using Djokdja Tools.| " +
				"Djokdja is a blogger tools to help|" +
				"blogging activities easier and faster|" +
				"The name of Djokdja is inspired from|" +
				"EartQuake in Java Island with more|" +
				"than 6000 victims.|" + 
				"[ Copyright middleware.or.id@2006 ]", CENTER);
		add(lab5);
		lab5.setBackColor(Color.DARK);		
		lab5.setRect(20, AFTER+10, rect.width - 40, rect.height - 60);
	}
	
	public void setStyle(int style) {
		setBackColor(Config.background[style]);
	}
}
